import request from '@/utils/request'

// 查询积分类型列表
export function treeList(query) {
  return request({
    url: '/partybuilding/ScoreType/treeList',
    method: 'get',
    params: query
  })
}

// 查询积分类型列表
export function listScoreType(query) {
  return request({
    url: '/partybuilding/ScoreType/list',
    method: 'get',
    params: query
  })
}

// 查询积分类型详细
export function getScoreType(id) {
  return request({
    url: '/partybuilding/ScoreType/' + id,
    method: 'get'
  })
}

// 新建积分分类
export function addCategory(data) {
  return request({
    url: '/partybuilding/ScoreType/addCategory',
    method: 'post',
    data: data
  })
}

// 新建积分规则
export function addRule(data) {
  return request({
    url: '/partybuilding/ScoreType/addRule',
    method: 'post',
    data: data
  })
}

// 修改积分类型
export function updateScoreType(data) {
  return request({
    url: '/partybuilding/ScoreType/edit',
    method: 'post',
    data: data
  })
}

// 删除积分类型
export function delScoreType(id) {
  return request({
    url: '/partybuilding/ScoreType/remove/' + id,
    method: 'post'
  })
}
